package com.example.wang_yi_homework2;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.example.wang_yi_homework2.Interface.UC1;
import com.example.wang_yi_homework2.Interface.UC2;
import com.example.wang_yi_homework2.Interface.UC3;
import com.example.wang_yi_homework2.Interface.UC4;
import com.example.wang_yi_homework2.Interface.UC5;

public class MainActivity extends AppCompatActivity {

    Button layout_1, layout_2, layout_3, layout_4, layout_5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        layout_1 = findViewById(R.id.layout_1);
        layout_2 = findViewById(R.id.layout_2);
        layout_3 = findViewById(R.id.layout_3);
        layout_4 = findViewById(R.id.layout_4);
        layout_5 = findViewById(R.id.layout_5);

        layout_1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, UC1.class);
                startActivity(intent);
            }
        });

        layout_2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, UC2.class);
                startActivity(intent);
            }
        });

        layout_3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, UC3.class);
                startActivity(intent);
            }
        });

        layout_4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, UC4.class);
                startActivity(intent);
            }
        });

        layout_5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, UC5.class);
                startActivity(intent);
            }
        });
    }
}